import request from "/@/utils/request"

export function checkstockHGetPageSet(query?: Object) {
    return request({
        url: '/eletile-mes/wmsCheckstockH/page',
        method: 'get',
        params: query
    })
}


export function CheckstockMaterialGetPageSet(query?: Object) {
    return request({
        url: '/eletile-mes/wmsCheckstockMaterial/page',
        method: 'get',
        params: query
    })
}

export function checkstockDGetPageSet(query?: Object) {
    return request({
        url: '/eletile-mes/wmsCheckstockD/page',
        method: 'get',
        params: query
    })
}


export function checkstockHCreate(query?: Object) {
    return request({
        url: '/eletile-mes/wmsCheckstockH/create',
        method: 'post',
        params: query
    })
}

export function checkstockHDelete(ids?: any) {
    return request({
        url: '/eletile-mes/wmsCheckstockH',
        method: 'delete',
        data: ids
    })
}

export function startCheckStock(ids?: Object) {
    return request({
        url: '/eletile-mes/wmsCheckstockH/start',
        method: 'post',
        params: {ids}
    })
}

export function checkStockReturnAudit(ids?: Object) {
    return request({
        url: '/eletile-mes/wmsCheckstockWarehouseD/checkStockReturnAudit',
        method: 'post',
        params: {ids}
    })
}

/**
 * MES库存调平
 * @param ids
 */
export function startMesLeveling(ids?: Object) {
    return request({
        url: '/eletile-mes/wmsCheckstockH/mesLeveling',
        method: 'post',
        params: {ids}
    })
}

/**
 * 撤销库存调平
 * @param ids
 */
export function mesCancelLeveling(ids?: Object) {
    return request({
        url: '/eletile-mes/wmsCheckstockH/mesCancelLeveling',
        method: 'post',
        params: {ids}
    })
}

/**
 * 回写ERP
 * @param ids
 */
export function erpLeveling(ids?: Object){
    return request({
        url: '/eletile-mes/wmsCheckstockH/erpLeveling',
        method: 'post',
        params: {ids}
    })
}

export function closeCase(ids?: Object) {
    return request({
        url: '/eletile-mes/wmsCheckstockH/closeCase',
        method: 'post',
        params: {ids}
    })
}

/**
 * 回料报功LVT
 */
export function feedBackNewLVT() {
    return request({
        url: '/eletile-mes/wmsCheckstockH/feedBackNewLVT',
        method: 'post',
    })
}

/**
 * 回料报功WPC
 */

export function feedBackNewWPC() {
    return request({
        url: '/eletile-mes/wmsCheckstockH/feedBackNewWPC',
        method: 'post',
    })
}


export function getNoDiskPageSet(params?: any) {
    return request({
        url: '/eletile-mes/wmsCheckstockH/getNoDiskPageSet',
        method: 'get',
        params: params
    })
}

export function getContrastK3PageSet(params?: any) {
    return request({
        url: '/eletile-mes/wmsCheckstockH/getContrastK3PageSet',
        method: 'get',
        params: params
    })
}


// 维护国外物料
export function createAbroadMaterial(params?: any) {
    return request({
        url: '/wms/po/CreateAbroadMaterial',
        method: 'post',
        data: params
    })
}

// 删除国外物料
export function deleteAbroadMaterial(params?: any) {
    return request({
        url: '/wms/po/DeleteAbroadMaterial',
        method: 'post',
        data: params
    })
}

//创建采购订单发货表
export function createPoShippingDetail(params?: any) {
    return request({
        url: '/wms/po/CreatePoShippingDetail',
        method: 'post',
        data: params
    })
}

// 删除采购订单发货表
export function deletePoShippingDetail(params?: any) {
    return request({
        url: '/wms/po/DeletePoShippingDetail',
        method: 'post',
        data: params
    })
}

//获取采购单明细列表
export function getPoDetailList(params?: any) {
    return request({
        url: '/wms/po/GetPoDetailList',
        method: 'post',
        data: params
    })
}

//获取采购订单发货列表byID
export function getPoShippingDetailById(params?: any) {
    return request({
        url: '/wms/po/GetPoShippingDetailById',
        method: 'post',
        data: params
    })
}
//获取采购订单发货列表
export function getPoShippindDetailList(params?: any) {
    return request({
        url: '/wms/po/GetPoShippingDetailList',
        method: 'post',
        data: params
    })
}

//修改采购订单发货表列表
export function UpdatePoShippingDetailt(params?: any) {
    return request({
        url: '/wms/po/UpdatePoShippingDetail',
        method: 'post',
        data: params
    })
}
//查询现有物料列表
export function getDicItemByCode(params?: any) {
    return request({
        url: '/wms/getValueSet/GetDicItemByCode',
        method: 'post',
        data: params
    })
}

//获取采购订单发货表列表-明细数据
export function getPoAndShipDetailList(params?: any) {
    return request({
        url: '/wms/po/GetPoAndShipDetailList',
        method: 'post',
        data: params
    })
}

//保存导入的数据
export function saveImportPoShipDetai(params?: any) {
    return request({
        url: '/wms/po/SaveImportPoShipDetai',
        method: 'post',
        data: params
    })
}